﻿@model EagleProject.Models.FormConsultantModel

@{
    ViewBag.Title = "CreateConsultant";
}

@using (Html.BeginForm("CreateConsultant", "Admin", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Create Consultant Form</legend>
        <ol>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.FirstName)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.FirstName)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.FirstName)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.MiddleName)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.MiddleName)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.MiddleName)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Lastname)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Lastname)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Lastname)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.UserName)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.UserName)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.UserName)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Addresses)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Addresses)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Addresses)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.City)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.City)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.City)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Email)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Email)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Email)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">
                    <label for="StateID">State</label></div>
                <div class="tbl-next">@Html.DropDownList("StateID", ViewBag.ListState as SelectList, "All", new { id = "StateID" })</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.LGAID)</div>
                <div class="tbl-next">@Html.DropDownList("LGAID", ViewBag.ListLGAs as SelectList, "Select Local Gov Area", new { id = "LGAID" })</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.LGAID)</div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>
    <fieldset>
        <legend>Guarantor Information</legend>
        <ol>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Guarantor_Name)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Guarantor_Name)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Guarantor_Name)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Guarantor_Address)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Guarantor_Address)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Guarantor_Address)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Guarantor_ContactNumber1)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Guarantor_ContactNumber1)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Guarantor_ContactNumber1)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Guarantor_ContactNumber2)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Guarantor_ContactNumber2)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Guarantor_ContactNumber2)</div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>
    <input type="submit" name="Submit" id="Submit" value="Submit" class="btn" />
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")"></script>
<script src="@Url.Content("~/DataScript/webApi.js")"></script>
<script>
    @*function registerUpdate(thisid, otherid, emptyString, apiUrl) {*@
    apiUrl = '@Url.Content("~/api/lga/")';
    registerUpdate('StateID', 'LGAID', 'Choose Local Gov Area', apiUrl);
</script>
